#ifndef __VILLAGE_MANAGER_H__
#define __VILLAGE_MANAGER_H__

#pragma once

#include <SolarHashTable.h>
using namespace util;

class Village;

class VillageManager
{
public:
	VillageManager();
	~VillageManager();

	VOID							Init();
	VOID							Release();
	VOID							Update( DWORD dwDeltaTick );
		
			
	Village *						CreateVillage( MAPID MapID );
	VOID							DestroyVillage( Village * pRoom );

	

	//get,set
	Village *						GetVillage( DWORD dwVillageKey );

private:
	VOID							_addVillage( Village * pRoom );
	VOID							_removeVillage( Village * pRoom );

	CMemoryPoolFactory<Village>	*	m_pVillagePool;
	SolarHashTable<Village *> *		m_pVillageHashTable;
};

extern VillageManager g_VillageManager;

#endif // __VILLAGE_MANAGER_H__